<div class="modal-header">
    <span>{{ modalHeader }}</span>
    <button class="close" aria-label="Close" (click)="closeModal()">
        <span aria-hidden="true">&times;</span>
    </button>
</div>
<div class="modal-body">
    <form>
        <nb-card>
            <nb-card-body>
                <div class="row">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label for="number">工号</label>
                            <input type="text" class="form-control" id="number" name="number" placeholder="工号" [(ngModel)]="user.number">
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label for="roleId">角色</label>
                            <select class="form-control" [(ngModel)]="user.roleId" name="roleId">
                                <option *ngFor="let option of roleList" [value]="option.id">{{option.roleName}}</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label for="userName">用户名</label>
                            <input type="text" class="form-control" id="userName" name="userName" placeholder="用户名" [(ngModel)]="user.userName">
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label for="nickName">昵称</label>
                            <input type="text" class="form-control" id="nickName" name="nickName" placeholder="昵称" [(ngModel)]="user.nickName">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label for="email">邮箱</label>
                            <input type="email" class="form-control" id="email" name="email" placeholder="邮箱" [(ngModel)]="user.email">
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label for="phone">手机号</label>
                            <input type="text" class="form-control" id="phone" name="phone" placeholder="手机号" [(ngModel)]="user.phone">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-6">
                        <div class="form-group">
                            <label for="pwd">密码</label>
                            <input type="password" class="form-control" id="pwd" name="pwd" placeholder="密码" [(ngModel)]="user.pwd">
                        </div>
                    </div>
                    <div class="col-sm-6" *ngIf="isEdit">
                        <div class="form-group">
                            <label for="status">状态</label>
                            <select class="form-control" [(ngModel)]="user.status" name="status">
                                <option *ngFor="let option of statusType" [value]="option.name">{{option.val}}</option>
                            </select>
                        </div>
                    </div>
                </div>
            </nb-card-body>
        </nb-card>
    </form>
</div>
<div class="modal-footer">
    <button class="btn btn-md" (click)="closeModal()">取消</button>
    <button class="btn btn-md btn-primary" (click)="saveData()">保存</button>
</div>